﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BUS;
using DAL;
using DTO;
using Utility;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
public partial class Admin_ThemLoaiSanPham : System.Web.UI.Page
{        
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void bt_them_Click(object sender, EventArgs e)
    {
        if (txt_tenloaisanpham.Text != "")
        {
            Loai loaisanpham = new Loai();
            loaisanpham.TenLoai = txt_tenloaisanpham.Text;
            
            LoaiBUS.INSERT(loaisanpham);
            Response.Redirect("DanhSachLoaiSanPham.aspx");
        }
        else
        {
            lb_msg.Text = "Bạn phải điền đầy đủ thông tin";
        }
    }
}